package com.bsoft.gol.hcs.enumcase;

/**
 * @author tongtp
 * @version v0.1
 * @package enumcase
 * @className ExecutionModeEnum
 * @description 搜索订阅状态枚举类
 * @create 2021-08-06 16:29
 **/
public enum SubscribeModeEnum {
	//执行方式：0 未订阅 1 订阅
	UN_SUBSCRIBE((byte) 0, "未订阅"),
	SUBSCRIBE((byte) 1, "订阅");

	private final Byte modeCode;

	private final String modeName;

	SubscribeModeEnum(Byte modeCode, String modeName) {
		this.modeCode = modeCode;
		this.modeName = modeName;
	}

	public static SubscribeModeEnum getEnumByKey(Byte modeCode) {
		for (SubscribeModeEnum temp : SubscribeModeEnum.values()) {
			if (temp.getModeCode().equals(modeCode)) {
				return temp;
			}
		}
		return null;
	}

	public String getModeName() {
		return modeName;
	}

	public Byte getModeCode() {
		return modeCode;
	}
}
